<?php

/** 
 * @author Administrator
 * 
 */
class App_version_mdl extends MY_Model {
	protected $_table = parent::T_APP_VERSION;
	public function __construct() {
		parent::__construct ();
		$this->load->database();
	}
	public function getLastVersion($system = 'android'){
		$where = array();
		$where['system'] = $system=='ios' ? 2:1;
		if( false && $system=='android' ){
			$where['internal_version'] = 8;
		}
		return $this->db->select('*')->from($this->_table)->where($where)->order_by('id','DESC')->limit(1)->get()->row_array();
	}
}

